<template>
	<view>
		<view class="nav">
			<view class="nav-item" v-for="item in navData" :key="item" @tap="navChange(item)">
				<view class="nav-text" :class="{black:item==defulat}">{{item}}(0)</view>
				<view class="middle" v-if="defulat==item"></view>
			</view>
		</view>
		
		
		<view class="" v-if="defulat=='全部'">
			<view class="nothing">
				<image class="nothing-image" src="https://z3.ax1x.com/2021/04/30/gAG5z6.png" mode=""></image>
			</view>
			<view class="receive">暂时没有可领取的优惠</view>
		</view>
		
		<view class="" v-if="defulat=='优惠卷'">
			<view class="nothing">
				<image class="nothing-image" src="https://z3.ax1x.com/2021/04/29/gkzGuQ.png" mode=""></image>
			</view>
			<view class="receive">暂时没有可领取的优惠卷</view>
		</view>
		
		<view class="" v-if="defulat=='卷包秒杀'">
			<view class="nothing">
				<image class="nothing-image" src="https://z3.ax1x.com/2021/04/30/gAGKIA.png" mode=""></image>
			</view>
			<view class="receive">暂时没有可领取的卷包</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				navData:['全部','优惠卷','卷包秒杀'],
				defulat:'全部'
			}
		},
		methods: {
			navChange(item){
				this.defulat=item
			}
		}
	}
</script>

<style>
	.nav {
		width: 100%;
		height: auto;
		/* border: 1px solid green; */
		border-bottom: 1rpx solid rgba(0,0,0,0.1);
		display: flex;
	}
	.nav-item{
		width: 100%;
		height: 80rpx;
		text-align: center;
		line-height: 75rpx;
	}
	.nav-text{
		font-size: 26rpx;
		color: rgba(0,0,0,0.6);
	}
	
	.black{
		font-weight: bold;
		color: #FF9912;
		font-size: 28rpx;
	}
	.middle{
		width: 65rpx;
		height: 6rpx;
		margin: 0rpx auto;
		background-color: #FF9912;
	}
	
	
	/* 优惠卷 */
	.nothing{
		width: 200rpx;
		height: 200rpx;
		/* border: 1px solid red; */
		margin: 300rpx auto 30rpx;
	}
	.nothing-image{
		width: 100%;
		height: 100%;
	}
	.receive{
		width: 100%;
		height: auto;
		text-align: center;
		font-size: 26rpx;
		color: rgba(0,0,0,0.6);
	}
	
</style>
